<!DOCTYPE html>
<html lang="zh">
<head>
	<meta charset="UTF-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<meta http-equiv="X-UA-Compatible" content="ie=edge" />
	<title>表单验证</title>
	<style>
		label{
			display: block;
		}
		label input{
			outline: none;
			padding: 10px 15px;
			margin: 5px;
			border-radius: 10px;
			border: 1px solid #999;
		}
		input::-webkit-outer-spin-button,
		input::-webkit-inner-spin-button {
		    -webkit-appearance: none ;
		    margin: 0;
		}
	</style>
</head>
<body>
	<form>
		<label>
			<input type="button" value="-"  name="" id="reduce" >
			<input type="number" id="number" value="1"/>
			<input type="button" name="" id="plus" value="+" />
		</label>
	</form>
</body>
<script src="input.js"></script>
<script>
	var inputF = new inputFun(10);
	$('#reduce').onclick=function(){
		$('#number').value = inputF.isReduce($('#number').value).val
	}
	$('#plus').onclick = function(){
		$('#number').value = inputF.isPluse($('#number').value).val
	}
	$('#number').onkeyup = function(){
		$('#number').value = inputF.keyup($('#number').value).val
	}
</script>
</html>